<?php


namespace app\wechat\validate;


use think\Validate;

class Speech extends Validate
{
    protected $rule=[
        'title|标题'=>'require',
        'book_name|书名'=>'require',
        'content|文章'=>'require',
        'type|分类'=>'require|number|between:1,2',
    ];
    protected $message=[
        'title.require'=>'昵称不允许为空',
        'book_name.require'=>'请填写书名',
        'content.require'=>'请填写内容',
//        'content.max'=>'内容超过上限',
    ];
    protected $scene=[
        'speech_one'=>['content','type'],
        'speech_tow'=>['book_name','content','type'],
    ];
}